package link.jfire.jnet.server.storage.waitstrategy;

import link.jfire.jnet.common.exception.ServerStopException;
import link.jfire.jnet.server.storage.ringarray.RingArray;

public class BusyWaitStrategy implements WaitStrategy
{
    
    @Override
    public void waitFor(long next, RingArray array) throws ServerStopException
    {
        while (array.isAvailable(next) == false)
        {
            if (array.stoped())
            {
                throw ServerStopException.INSTANCE;
            }
        }
    }
    
    @Override
    public void signallBlockwaiting()
    {
    }
    
}
